package com.learn.event;

import org.springframework.context.ApplicationListener;
import org.springframework.stereotype.Component;

/**
 * @Author:Mark
 * @Description:
 * @Date: Created on 11:12 2018-11-13
 * @Modify by:
 */
@Component
public class DemoListener implements ApplicationListener<DemoEvent> {

  @Override
  public void onApplicationEvent(DemoEvent demoEvent) {
    String message=demoEvent.getMsg();
    System.out.println("我接受到了消息"+message);
  }
}
